package tasks;

import android.os.AsyncTask;

/**
 * Created by Administrator on 15-10-20.
 */

/**
 * 异步任务的族类
 */
// todo 有错误
public abstract class BaseTask extends AsyncTask<String,Void,TaskResult> {
    private TaskCallBack callBack;

    public BaseTask(TaskCallBack callBack) {
        this.callBack = callBack;
    }

    protected TaskResult doInBackground(String... strings) {
        return null;
    }

    @Override
    protected void onPostExecute(TaskResult result) {
        if(callBack!=null)
        {
            //todo
            // 有错误
            callBack.onTaskFinished(result);
        }
    }
}
